<div class="channels" ui-view="container">
    <ol class="breadcrumb" style="font-size: 12px">
        <li>广告中心</li>
        <li>渠道主</li>
        <li>帐号管理</li>
    </ol>

    <div class="panel">
        <div class="searchWapper">
            <div class="form-group searchLump search-condition">
                <div class="searchTitle">筛选：</div>
                <div class="btn btn-xs condition" ng-repeat="(key,value) in search" ng-if="status[value]&&(key=='status')">
                    <a href="javascript:void(0);" class="close" ng-click="deletes(key)">
                        <span aria-hidden="true">&times;</span>
                    </a>
                    {{status[value]}}
                </div>
            </div>
            <div class="form-group searchLump">
                <div class="searchTitle">状态：</div>
                <label class="btn btn-xs" ng-class="{on : search.status == key}"  ng-repeat="(key, value) in status">
                    <input type="radio" class="hide" name="radioStatus" ng-value="key" ng-model="search.status" ng-change="searchChange()">{{value}}
                </label>
            </div>

        </div>
        <div class="bg-20"></div>
        <div class="panel-heading panel-style">
            <div class="row panel-row">
                <div class="col-lg-3">
                    <div class="input-group input-group-sm">
                        <input type="text" class="form-control" name="keyword" ng-model="keyword" placeholder="搜索">
						<span class="input-group-btn btn-bearch">
							<button class="btn btn-default" type="button" ng-click="searchClick(keyword)">
                                <i class="glyphicon glyphicon-search"></i>
                            </button>
						</span>
                    </div>
                </div>
                <div class="search-operation pull-right">
                    <a ui-sref="channels.detail"  class="btn">
                        <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
                    </a>
                    <a href="javascript:void(0);" class="btn" ng-click="deleteChannels()">
                        <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
                    </a>
                </div>
            </div>
        </div>
        <div class="table-responsive">
            <table class="table table-bordered table-hover">
                <thead>
                <tr>
                    <th>选择</th>
                    <th>序号	</th>
                    <th>帐号</th>
                    <th>渠道主</th>
                    <th>应用</th>
                    <th>广告收益</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="item in channels.pageList">
                    <td><input type="checkbox" ng-model="item.checked" class="magic-checkbox" id="{{'ChannelList' + ($index + 1)}}">
                        <label for="{{'ChannelList' + ($index + 1)}}"></label>
                    </td>
                    <td>{{(paginationConf.currentPage - 1) * paginationConf.itemsPerPage + $index + 1}}</td>
                    <td>{{item.userName}}</td>
                    <td><a ui-sref="channels.detail({channelId:item.channelId})"><p class="list-rlue" ng-bind-html="$sce.trustAsHtml(item.shortName)"></p></a></td>
                    <td><a ui-sref="channels.app({channelId:item.channelId})">{{item.appNum==0?"--":item.appNum}}</a></td>
                    <td>需要计算</td>
                    <td>
					<span ng-class="{'text-success': item.disabled == 2 , 'text-danger': item.disabled == 1}">
						{{table[item.status]}}
					</span>
                    </td>
                    <td>
                        <a href="javascript:void(0);"  ng-click="resetChannelPassword(item.channelId,item.userName)" class="time-out">
                            重置
                        </a>
                        <a href="javascript:void(0);"  ng-click="changeChannelStatus(item.channelId, item.status)" class="time-out">
                            {{item.status == 1 ? "激活" : "冻结"}}
                        </a>
                        <p class="time-out" ng-if="item.status == 4 && item.statusView == 8">
                            ---
                        </p>
                        <!--<a ui-sref="channels.statistics({channelId:item.channelId,pageNo:1,pageSize:10})" class="ml-10">统计</a>-->
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
    <div class="panel-footer">
        <s-pagination conf="paginationConf"></s-pagination>
    </div>
    <!--<a ui-sref="campaigns.detail({campaignsId:1})"  ui-sref-opts="{inherit:false}">aaaaa</a>-->
</div>
